package com.cskaoyan.controller;

import com.cskaoyan.bean.WxCollectBO;
import com.cskaoyan.bean.basebean.BaseRespVo;
import com.cskaoyan.bean.zhao_order_bean.BasePageData;
import com.cskaoyan.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @description: ${description}
 * @author: cuicui
 **/
@RestController
@RequestMapping("wx/collect")
public class CollectController {

    @Autowired
    CollectService collectService;

    @PostMapping("addordelete")
    public BaseRespVo wxCollectAddordelete(@RequestBody WxCollectBO collectBO){
        collectService.updateOrdelete(collectBO);
        return BaseRespVo.ok("成功");
    }

    @GetMapping("list")
    public BaseRespVo wxCollectList(Integer type,Integer limit,Integer page){
        BasePageData vo=  collectService.collectList(type,limit,page);
        return BaseRespVo.ok(vo,"成功");
    }
}
